package com.levine.base_libs.activity;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.levine.base.R;
import com.levine.base_libs.view.BaseView;

import java.util.List;

public class BaseActivity extends AppCompatActivity implements View.OnClickListener {

    public final String TAG = getClass().getSimpleName();

    public BaseView mBaseView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBaseView = new BaseView(getActivity());
        setContentView(mBaseView.getView());
        mBaseView.setBar(false, R.color.white, 0);
        mBaseView.statusMask.setBackgroundResource(R.color.F7AF1D);
        mBaseView.qmui_top_bar.setBackgroundResource(R.color.F7AF1D);
        mBaseView.qmui_top_bar.setTitle("").setTextColor(Color.WHITE);
        //默认添加返回按钮
        mBaseView.qmui_top_bar.addLeftBackImageButton().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    protected void getData() {

    }

    protected void init() {

    }

    protected void initView() {

    }

    protected void initData() {

    }

    protected void initListView() {

    }

    public Activity getActivity() {
        return this;
    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        mBaseView = null;
    }

    @Override
    public void onClick(View view) {

    }
}
